﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SqlMiM.Common.ViewModel;
using SqlMiM.SqlIndexes.Model;
using SqlMiM.Common.Model;
using MvvmFoundation.Wpf;

namespace SqlMiM.SqlIndexes.ViewModel
{
    public class DatabaseView : ObservableObject
    {
        private Database database;
        private bool isChecked = false;


        public DatabaseView()
        {
        }

        public DatabaseView(Database db)
        {
            this.Database = db;
        }

        public Database Database
        {
            get { return database; }
            set
            {
                database = value;
                this.RaisePropertyChanged("Database");
            }
        }

        public Int32 DbID
        {
            get { return database.Id; }
        }

        public String DatabaseName
        {
            get { return database.Name; }
        }

        public bool IsChecked
        {
            get { return isChecked; }
            set
            {
                if (value != isChecked)
                {
                    isChecked = value;
                    this.RaisePropertyChanged("IsChecked");
                }
            }
        }
    }

}
